package com.summer.controller;

import com.summer.utils.ResponseEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
//https://www.jianshu.com/p/dafde20367c4 swagger2网址
//https://gitee.com/yezhihao/rbac/tree/master RBAC
//https://gitee.com/gapper/projects RBAC
@CrossOrigin
@RestController
@RequestMapping("test")
@Transactional
@Api(value = "TestController", description = "测试api")
public class TestController {

    @GetMapping("/hello")
    @ApiOperation("测试接口是否能够连通")
    public ResponseEntity hello(){
        ResponseEntity responseEntity;
        responseEntity = ResponseEntity.ok();
        responseEntity.putDataValue("msg","接口已经连通");
        return responseEntity;
    }
}
